package net.eascn.babyClone.commands
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import mx.rpc.IResponder;
	import mx.rpc.events.ResultEvent;
	
	import net.eascn.babyClone.business.*;
	import net.eascn.babyClone.model.ModelLocator;
	import net.eascn.babyClone.utility.VoXMLUtil;

	public class GetBorederDefinedDataCommand implements ICommand, IResponder
	{
		// attributes ============================
		private var model : ModelLocator = ModelLocator.getInstance();
		private var _GetBorederDefinedDataServiceDelegate:GetBorederDefinedDataServiceDelegate = new GetBorederDefinedDataServiceDelegate(this as IResponder);



		// functions ============================
		public function execute( event:CairngormEvent ) : void
		{
			_GetBorederDefinedDataServiceDelegate.getBorederDefinedData();
		}
		
		//----------------------------------------------------------------------------
		public function result( data:Object ) : void
		{
			var resultXML:XML  =ResultEvent(data).result as XML;
			model.borderDefined =VoXMLUtil.parseFrameDescXML(resultXML);
		}
		
		//----------------------------------------------------------------------------
		public function fault( info : Object ) : void
		{
			trace(info);
			
			
		}

	}
}